/*
 * @Description: count的action方法
 * @Author: 姚泽毅
 * @Date: 2021-08-31 19:26:02
 * @LastEditTime: 2021-09-02 15:31:00
 */
import { INCREMENT, DECREMENT } from "../constant";

export const increment = (data) => ({ type: INCREMENT, data });
export const decrement = (data) => ({ type: DECREMENT, data });
export const incrementAsync = (data, time) => {
	return (dispatch) => {
		setTimeout(() => {
			dispatch(increment(data));
		}, time);
	};
};
